<template>
	<view class='goods-content bg-active-color' @click="goPayment">
		<image class='goods-img' :src="item.imgUrl || '../../static/img/commodity2.jpg'" mode=""></image>
		<view class='goods-text'>
			<view class='goods-name'>{{item.goods_name}}</view>
			<view class='goods-size f-color'>颜色分类：白色</view>
			<view class='f-active-color' style='font-size:24rpx'>7天无理由</view>
		</view>
		<view>
			<view>¥{{item.goods_price}}</view>
			<view class='f-color'>*{{item.goods_num}}</view>
		</view>
	</view>
</template>

<script>
export default{
	props:{
		item:Object,
		index:Number
	},
	methods: {
		goPayment(){
			this.$emit('click', this.item)
		}
	}
}
</script>

<style scoped>
.goods-content{
	padding:10rpx 20rpx;
	display: flex;
	justify-content: space-between;
	align-items: center;
}
.goods-text{
	width:360rpx;
	padding:0 10rpx;
	font-size:26rpx;
}
.goods-img{
	width:160rpx;
	height:160rpx;
}
.goods-name{
	display: -webkit-box;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 2;
	overflow: hidden;
	font-size:26rpx;
}
.goods-size{
	font-size:24rpx;
}
</style>
